﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ViewExportAttribute.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the <seealso cref="ViewExportAttribute" /> type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Client.Common.Helpers
{
    using System;
    using System.ComponentModel.Composition;

    /// <summary>
    /// Defines the <seealso cref="ViewExportAttribute"/> type.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    [MetadataAttribute]
    public class ViewExportAttribute : ExportAttribute, IViewRegionRegistration
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ViewExportAttribute"/> class.
        /// </summary>
        public ViewExportAttribute()
            : base(typeof(object))
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ViewExportAttribute"/> class.
        /// </summary>
        /// <param name="viewName">Name of the view.</param>
        public ViewExportAttribute(string viewName)
            : base(viewName, typeof(object))
        {
        }

        /// <summary>
        /// Gets or sets the name of the region.
        /// </summary>
        /// <value>
        /// The name of the region.
        /// </value>
        public string RegionName { get; set; }
    }
}